#include<stdio.h>
#include<string.h>
char a[100], ch;
int main()
{
	while(scanf("%s %c", a, &ch) != EOF)
	{
		int n = strlen(a);
		a[n] = ch;
		for(int i=0; i<=n; i++)
			for(int j=i; j<=n; j++)
				if(a[i] > a[j])
				{
					char tmp = a[i];
					a[i] = a[j];
					a[j] = tmp;
				}
		printf("%s\n", a);
	}
	return 0;
}
